package com.itheima.comfyui.core.util;

import com.itheima.comfyui.core.pojo.User;

public class UserUtils {
    static  ThreadLocal<User> userThreadLocal = new ThreadLocal<>();
    //设置用户
    public static void setUser(User user){
        userThreadLocal.set(user);
    }
    //获取用户
    public static User getUser(){
        return userThreadLocal.get();
    }
    //清除用户
    public static void clearUser(){
        userThreadLocal.remove();
    }
}
